@cachly-dev/mcp-server 0.10.234 → 0.10.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,37 +1,61 @@
1
- # cachly — experience for coding agents (MCP server)
1
+ # cachly — memory for coding agents (MCP server)
2
2
 
3
3
  > **Solve it once. From then on, your AI knows.**
4
4
  >
5
- > Every fix, every decision and every dead end becomes experience your AI uses at
6
- > the right moment. You build faster, and your team builds on what you figured out.
5
+ > Every fix, decision and dead end becomes a lesson. Your AI finds it again when the same
6
+ > problem comes back, in the next session, in another editor, or on a teammate's machine.
7
7
 
8
8
  [![npm version](https://img.shields.io/npm/v/@cachly-dev/mcp-server?color=violet&logo=npm)](https://www.npmjs.com/package/@cachly-dev/mcp-server)
9
- ![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-yellow)
9
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-yellow)](./LICENSE)
10
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.cachly--dev%2Fmcp--server-blue)](https://registry.modelcontextprotocol.io/v0/servers?search=cachly)
11
+ [![Hosted in the EU](https://img.shields.io/badge/hosted_in-the_EU-003399)](https://cachly.dev/docs/eu-hosted-mcp-memory-server)
10
12
 
11
- `@cachly-dev/mcp-server` connects [cachly](https://cachly.dev) to Claude Code, Cursor,
12
- GitHub Copilot, Windsurf, Cline, Continue.dev, Zed, Codex CLI and Gemini CLI over
13
- [MCP](https://modelcontextprotocol.io). It offers 124 MCP tools. Your editor lists 27 entries
14
- by default and reaches the rest through one of them, `cachly_tool` (details under MCP
15
- Tools below). Your AI stores a lesson after a fix, and finds it again when the same
16
- problem returns. Your Brain (the store of your lessons) lives on EU servers.
13
+ **Works with** Claude Code · Cursor · GitHub Copilot · Windsurf · Cline · Continue.dev · Zed ·
14
+ Codex CLI · Gemini CLI · JetBrains IDEs
17
15
 
18
- ## Start without an account
16
+ [Quick start](#quick-start) · [What it looks like](#what-it-looks-like) ·
17
+ [Pricing](#pricing) · [FAQ](#faq) · [Reference](#reference) · [cachly.dev](https://cachly.dev)
19
18
 
20
- ### Claude Code
19
+ ## Quick start
20
+
21
+ **Claude Code** — two lines, and the next session has a Brain (the store of your lessons):
21
22
 
22
23
  ```
23
24
  /plugin marketplace add cachly-dev/cachly-mcp
24
25
  /plugin install cachly-brain@cachly
25
26
  ```
26
27
 
27
- There is no JSON to write, no path to set and no key to copy. Without a key, cachly creates
28
- a test Brain on EU servers when the session starts (the plugin hook does it; the first tool
29
- call does it if the hook did not). The test Brain has 14 days of
30
- the Solo tier. After that it runs on the free tier with the same key.
28
+ cachly creates a test Brain on EU servers when the session starts. It comes with 14 days
29
+ of the Solo plan and then continues on Free with the same key. Check it with
30
+ `claude mcp list`: you should see `plugin:cachly-brain:cachly … ✔ Connected`.
31
+
32
+ **Cursor, Windsurf, VS Code, Cline, Continue.dev, Zed, Codex CLI, Gemini CLI** — one command:
33
+
34
+ ```bash
35
+ npx @cachly-dev/mcp-server@latest autopilot
36
+ ```
37
+
38
+ `autopilot` finds your editors, writes the MCP config and the rule file for each, adds a
39
+ git hook that learns from your commits, and fills your Brain from your git history. You
40
+ sign in once in the browser with a device code. Restart your editor afterwards.
41
+
42
+ **Already inside Claude, Cursor or Copilot?** Paste this to your AI:
43
+
44
+ ```
45
+ Set up cachly for this project. Run: npx @cachly-dev/mcp-server@latest autopilot
46
+ Follow the browser sign-in, then restart the editor.
47
+ ```
48
+
49
+ **In the IDE:** the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=cachly-dev.cachly-brain)
50
+ creates your Brain on first start. The [JetBrains plugin](https://plugins.jetbrains.com/plugin/32059-cachly-brain)
51
+ brings it to IntelliJ IDEA, PyCharm, GoLand, WebStorm and Rider
52
+ ([guide](https://cachly.dev/docs/jetbrains)).
31
53
 
32
- Check it with `claude mcp list`. You should see `plugin:cachly-brain:cachly … ✔ Connected`.
33
- `claude plugin details` shows `MCP servers (0)` even when the server runs, because it
34
- does not count them.
54
+ **Keep your test Brain** with `npx @cachly-dev/mcp-server@latest claim`. You sign in once,
55
+ and the Brain moves into your account with all its lessons.
56
+
57
+ <details>
58
+ <summary><b>Claude Code in detail:</b> the three hooks, auto-update, and the test Brain</summary>
35
59
 
36
60
  The plugin adds three Claude Code hooks:
37
61
 
@@ -39,72 +63,118 @@ The plugin adds three Claude Code hooks:
39
63
  |------|--------------|
40
64
  | `SessionStart` | Gives your AI a short briefing: the 5 most-reused lessons (on a new Brain: starter tips) |
41
65
  | `UserPromptSubmit` | Puts the lessons that match your prompt next to it |
42
- | `Stop` | Saves a lesson when the AI's last message clearly reports a fix. It skips messages that say something failed or is unclear. It tells you nothing when it saves. |
66
+ | `Stop` | Saves a lesson when the AI's last message clearly reports a fix. It skips messages that say something failed or is unclear. It saves quietly. |
43
67
 
44
68
  Turn on auto-update once: `/plugin` → **Marketplaces** → **cachly** → **Enable auto-update**.
45
69
  Claude Code leaves it off for marketplaces outside Anthropic's own. The MCP server updates
46
- itself on every start, but the hooks come with the plugin and update only with it. If an
47
- update is waiting, the first `session_start` of a session says so in one line.
70
+ itself on every start; the hooks come with the plugin and update with it. If an update is
71
+ waiting, the first `session_start` of a session says so in one line.
72
+
73
+ The test Brain is created by the plugin hook at session start, or by the first tool call
74
+ if the hook did not run. `claude mcp list` is the reliable check: `claude plugin details`
75
+ shows `MCP servers (0)` even while the server runs.
76
+
77
+ `claim` revokes every test key and stores a new key where your editor and hooks look for
78
+ it. The Brain restarts once, which takes about 20 seconds. The Free plan holds one Brain:
79
+ if you already have one, `claim` stops with a message and leaves both Brains as they are.
80
+
81
+ `autopilot` writes these rule files, so each editor's AI checks its memory before a task:
82
+ `CLAUDE.md`, `AGENTS.md`, `.cursor/rules/cachly.mdc`, `.github/copilot-instructions.md`,
83
+ `.windsurfrules`, `.clinerules`, and `GEMINI.md`, `.junie/guidelines.md` and
84
+ `.continue/rules/cachly.md` where you use Gemini CLI, Junie or Continue. Claude Code and
85
+ Gemini CLI also follow the server's own instructions; Cline, Continue and Zed rely on the
86
+ rule file. You can also add the server by hand (see [Manual Setup](#manual-setup)).
87
+ </details>
48
88
 
49
- ### Keep your test Brain
89
+ ## What it looks like
90
+
91
+ Monday, your AI fixes a bug and keeps what worked (output shortened):
50
92
 
51
- ```bash
52
- npx @cachly-dev/mcp-server@latest claim
53
93
  ```
94
+ learn_from_attempts(topic="billing:invoice-rounding", outcome="success",
95
+ what_worked="ROUND HALF-EVEN IN invoice_total(): Math.round drifted by one cent on .5 values",
96
+ file_paths=["src/billing/invoice.ts"])
54
97
 
55
- You sign in once in the browser. The test Brain then moves into your account with all
56
- its lessons. Every test key is revoked, and you get a new key that is stored where your
57
- editor and hooks look for it. The Brain restarts once, which takes about 20 seconds.
58
- If you already have a free Brain, the one-Brain limit of the free tier applies and the
59
- move is refused with a message.
98
+ ✅ Lesson stored: billing:invoice-rounding
99
+ ```
60
100
 
61
- ### Cursor, Windsurf, VS Code, Cline, Continue.dev, Zed
101
+ Three weeks later, a new session, a different person, the same symptom:
62
102
 
63
- ```bash
64
- npx @cachly-dev/mcp-server@latest autopilot
65
103
  ```
104
+ smart_recall(query="invoice total is one cent off")
66
105
 
67
- `autopilot` finds the editors you use and writes the MCP config for each. It also writes
68
- the rule file each editor reads in every chat (`CLAUDE.md`, `AGENTS.md`,
69
- `.cursor/rules/cachly.mdc`, `.github/copilot-instructions.md`, `.windsurfrules`,
70
- `.clinerules`; `GEMINI.md`, `.junie/guidelines.md` and `.continue/rules/cachly.md` where
71
- you use Gemini CLI, Junie or Continue), which tells your AI to check its memory before a task. It adds a git
72
- hook that learns from your commits and fills your Brain from your git history. You sign
73
- in once in the browser (a device code, no password, no credit card), so the Brain
74
- belongs to your own account from the start. Restart your editor afterwards.
106
+ 💡 billing:invoice-rounding · 👤 anna
107
+ ROUND HALF-EVEN IN invoice_total(): Math.round drifted by one cent on .5 values
108
+ ▸ src/billing/invoice.ts
109
+ ```
75
110
 
76
- You can also add the server by hand (see [Manual Setup](#manual-setup)). Without a key,
77
- the first tool call creates the same test Brain as in Claude Code. Without a rule file,
78
- Claude Code still starts each task with `smart_recall`, because the server's instructions
79
- ask for it. Gemini CLI also passes them on. Some editors do not (Cline, Continue and Zed,
80
- for example); there, the rule file from `autopilot` is what makes your AI use its memory.
111
+ Your AI starts from the fix. With the hooks, this happens before you type: the matching
112
+ lessons are placed next to your prompt.
113
+
114
+ **Some fixes come back.** After a time/date or a dependency fix, `learn_from_attempts` adds
115
+ a relapse watch with counted numbers from 289 open-source projects. For example: 148 of
116
+ 791 time/date fixes (19 %) were followed within 90 days by another time/date problem in
117
+ the same files, 4.4× as often as a random issue in the same project. Each hint links a
118
+ real pair of issues as an example.
119
+
120
+ **Some fixes need a second file.** When you store a security fix and none of the files you
121
+ name is a manifest or lock file, `learn_from_attempts` says so: across the same 289
122
+ projects, 1127 security fixes changed a dependency file more often than other fixes in the
123
+ same project, 59 % vs 25 % in the largest dataset.
124
+
125
+ ## Why developers and teams use it
126
+
127
+ - **Your AI keeps what it learned.** Lessons outlive the session, the editor and the
128
+ model. One Brain serves Claude Code, Cursor, Copilot, Codex and the others at the same
129
+ time.
130
+ - **Your team learns each thing once.** `invite teammate@example.com` shares your Brain.
131
+ Every lesson carries the name of whoever learned it, and a reviewer can confirm it so
132
+ it ranks higher.
133
+ - **A light footprint in the context window.** Your editor lists 27 tool entries, about
134
+ 8,000 tokens per request. All 124 MCP tools stay one call away through
135
+ `cachly_tool`.
136
+ - **Your data stays in the EU and stays yours.** Storage in Germany, embeddings computed
137
+ in the EU, and `export` writes every lesson to Markdown and JSONL whenever you like.
138
+ The server is open source under Apache-2.0.
81
139
 
82
- > **Already inside Claude, Cursor or Copilot?** Paste this to your AI:
83
- > ```
84
- > Set up cachly for this project. Run: npx @cachly-dev/mcp-server@latest autopilot
85
- > Follow the browser sign-in, then restart the editor.
86
- > ```
140
+ ## How it works
87
141
 
88
- ### VS Code extension
142
+ 1. A fix, a decision or a dead end is stored as a lesson: topic, what worked, what failed,
143
+ severity, file paths, commands and author.
144
+ 2. At the start of a session, your AI receives a briefing with the last session, open
145
+ failures and recent lessons.
146
+ 3. When you ask for something, `smart_recall` looks up the lessons that match. It combines
147
+ keyword search (BM25), meaning-based search and the causal graph, in 11 languages.
148
+ 4. When an error appears, `causal_trace` walks from the symptom to the cause and to the fix
149
+ that worked.
150
+ 5. Before a deploy, `brain_predict` lists failure patterns from past incidents.
151
+ 6. A git hook and the [CI templates](#ci-integration) add lessons from commits and from
152
+ red-to-green runs.
153
+ 7. Lessons are shared in the team. Each one carries the name of whoever learned it.
89
154
 
90
- Install **[cachly Brain](https://marketplace.visualstudio.com/items?itemName=cachly-dev.cachly-brain)**.
91
- It creates your Brain on first start, with no account form.
155
+ **See it on your own project first:** `npx @cachly-dev/mcp-server@latest demo` reads your
156
+ git history and prints the fixes, patterns and decisions your AI would know. It runs
157
+ entirely on your machine.
92
158
 
93
- ### JetBrains plugin
159
+ **Our agreement with you.** You can leave and take your data:
160
+ `npx @cachly-dev/mcp-server@latest export` writes every lesson to `lessons.md` (to read)
161
+ and `lessons.jsonl` (to reuse). Code excerpts are stored only when you call
162
+ `index_project` yourself, and then only on your own EU instance. Read
163
+ [what leaves your machine](https://cachly.dev/docs/eu-hosted-mcp-memory-server) before you
164
+ decide.
94
165
 
95
- Install **[Cachly Brain](https://plugins.jetbrains.com/plugin/32059-cachly-brain)**
96
- from the JetBrains Marketplace (IntelliJ IDEA, PyCharm, GoLand, WebStorm, Rider). The
97
- status bar, the Brain health and the lessons view live in the IDE. The source is at
98
- [cachly-dev/cachly-intellij](https://github.com/cachly-dev/cachly-intellij). The
99
- [JetBrains plugin guide](https://cachly.dev/docs/jetbrains) shows how Claude Code, Junie
100
- and JetBrains AI Assistant get the Brain over MCP.
166
+ ## Pricing
101
167
 
102
- ### MCP Registry
168
+ | Plan | Price | People | Storage |
169
+ |------|-------|--------|---------|
170
+ | **Free** | €0 | 1 | 25 MB, one Brain, 500 recalls a month |
171
+ | **Solo** | €19/month | 1 | 200 MB |
172
+ | **Team** | €49/month | up to 5 | 900 MB |
173
+ | **Business** | €199/month | up to 20, with SSO | 7 GB |
103
174
 
104
- The server is listed in the official
105
- **[MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=cachly)** as
106
- `io.github.cachly-dev/mcp-server`. Clients that browse the registry find it by name. The
107
- entry points at this npm package.
175
+ Start on Free with a sign-in, without a credit card. Organisations are free; you pay per
176
+ Brain plan. Yearly billing and the current limits are on
177
+ [cachly.dev/pricing](https://cachly.dev/pricing).
108
178
 
109
179
  ## Guides
110
180
 
@@ -119,33 +189,49 @@ entry points at this npm package.
119
189
  | [JetBrains plugin guide](https://cachly.dev/docs/jetbrains) | What the plugin does, and how Claude Code, Junie and JetBrains AI Assistant use the Brain. |
120
190
  | [Repo X-ray](https://cachly.dev/roentgen) | Enter a public GitHub repo. In a few seconds you see how many problems its team has solved, and which ones more than once. |
121
191
 
122
- ## How it works
192
+ ## FAQ
123
193
 
124
- 1. A fix, a decision or a dead end is stored as a lesson: topic, what worked, what failed,
125
- severity, file paths, commands and author.
126
- 2. At the start of a session, your AI receives a briefing with the last session, open
127
- failures and recent lessons.
128
- 3. When you ask for something, `smart_recall` looks up the lessons that match. It combines
129
- keyword search (BM25), meaning-based search and the causal graph, in 11 languages.
130
- 4. When an error appears, `causal_trace` walks from the symptom to the cause and to the fix
131
- that worked.
132
- 5. Before a deploy, `brain_predict` lists failure patterns from past incidents.
133
- 6. A git hook and the [CI templates](#ci-integration) add lessons from commits and from
134
- red-to-green runs.
135
- 7. Lessons are shared in the team. Each one carries the name of whoever learned it.
194
+ **How is this different from a `CLAUDE.md` or a memory folder?**
195
+ A rule file is read in full in every session, so it grows and costs tokens each time.
196
+ cachly keeps lessons outside the prompt and places only the matching ones next to it, ranked
197
+ by outcome and review. The [comparisons](#guides) show where a plain file or another product
198
+ fits better.
136
199
 
137
- To see what your AI would know before you install anything, run
138
- `npx @cachly-dev/mcp-server@latest demo` in a project folder. It reads your git history and
139
- prints your fixes, patterns and decisions. Nothing leaves your machine.
200
+ **Does my AI need to call `session_start` by hand?**
201
+ No. A session starts on the first tool call and ends when the editor closes.
140
202
 
141
- **Our agreement with you.** You can leave and take your data:
142
- `npx @cachly-dev/mcp-server@latest export` writes every lesson to `lessons.md` (to read)
143
- and `lessons.jsonl` (to reuse). Code excerpts are stored only if you call `index_project`
144
- yourself, and only on your own EU instance. Read
145
- [what leaves your machine](https://cachly.dev/docs/eu-hosted-mcp-memory-server) before you
146
- decide.
203
+ **Can my whole team share one Brain?**
204
+ Yes. Use `team_learn` and `team_recall`, and invite people with
205
+ `npx @cachly-dev/mcp-server@latest invite teammate@example.com`. They get an email and accept it
206
+ with the link or with `join <token>`. Members can read and learn; deleting the Brain, rotating
207
+ its password and billing stay with the owner.
208
+
209
+ **Is my code sent to cachly servers?**
210
+ Only if you call `index_project` yourself. It stores a short excerpt (up to
211
+ `summary_chars`, 1200 characters by default) per indexed file, on your own EU instance.
212
+ Every other tool stores lesson text, commit messages, session summaries and key-value
213
+ context, but no source code. Storage is in Germany and embeddings are computed in the EU.
214
+ API traffic passes through Cloudflare, a US company. The
215
+ [EU guide](https://cachly.dev/docs/eu-hosted-mcp-memory-server) lists every data flow.
216
+
217
+ **What is `causal_trace`?**
218
+ Given an error, it walks the causal knowledge graph to find the root cause, the
219
+ intermediate causes and the fix that worked, with its date and commands.
220
+
221
+ **What if I hit the context-window limit mid-session?**
222
+ Call `compact_recover`. It rebuilds your context from the Crystal, the recent
223
+ sessions and the registry of work in progress. Usually one tool call is enough.
147
224
 
148
- ## MCP Tools (124 total, 27 listed by default)
225
+ **How do I write lessons my agent finds again?**
226
+ Lead with the decisive fact. The
227
+ [lessons guide](https://cachly.dev/docs/coding-agent-lessons-learned) shows how, with
228
+ examples.
229
+
230
+ ## Reference
231
+
232
+ Everything below is for looking things up. The long tables open with a click.
233
+
234
+ ### MCP Tools (124 total, 27 listed by default)
149
235
 
150
236
  Your editor sees 27 entries by default: the daily tools (26 of them) and one dispatcher,
151
237
  `cachly_tool`. This is on purpose. The full list of 124 costs about 28,000 tokens in every
@@ -157,11 +243,13 @@ cachly_tool(tool: "team_roster") run any of them by name
157
243
  cachly_tool(tool: "team_roster", describe: true) get its schema first
158
244
  ```
159
245
 
160
- Nothing is unreachable. The server dispatches by name, so `team_roster` called directly
246
+ Every tool stays reachable. The server dispatches by name, so `team_roster` called directly
161
247
  still works. Set `CACHLY_ALLE_WERKZEUGE=1` to list all 124. Set `CACHLY_PROFILE=lean` to
162
248
  list 8 plus `cachly_tool`, or `CACHLY_PROFILE=recall` to list the 3 read-only tools.
249
+ <details>
250
+ <summary><b>All tools by area</b></summary>
163
251
 
164
- ### Session and lessons (most used)
252
+ #### Session and lessons (most used)
165
253
 
166
254
  | Tool | What it does |
167
255
  |------|-------------|
@@ -173,7 +261,7 @@ list 8 plus `cachly_tool`, or `CACHLY_PROFILE=recall` to list the 3 read-only to
173
261
  | **`remember_context`** | Keep architecture findings, decisions and file summaries |
174
262
  | **`compact_recover`** | Recover your context after you hit the context-window limit |
175
263
 
176
- ### Team Brain and org knowledge graph
264
+ #### Team Brain and org knowledge graph
177
265
 
178
266
  | Tool | What it does |
179
267
  |------|-------------|
@@ -192,7 +280,7 @@ list 8 plus `cachly_tool`, or `CACHLY_PROFILE=recall` to list the 3 read-only to
192
280
  | `memory_crystalize` | Distill all lessons into a Crystal for instant team context |
193
281
  | `team_crystallize` | A Team Crystal: fixes that 2 or more teammates reached independently |
194
282
 
195
- ### Causal intelligence
283
+ #### Causal intelligence
196
284
 
197
285
  | Tool | What it does |
198
286
  |------|-------------|
@@ -213,7 +301,7 @@ causal_trace(problem="auth breaks after restart")
213
301
  → Fix: PollUntilContextTimeout 3min
214
302
  ```
215
303
 
216
- ### Shareable and public Brains
304
+ #### Shareable and public Brains
217
305
 
218
306
  | Tool | What it does |
219
307
  |------|-------------|
@@ -223,21 +311,22 @@ causal_trace(problem="auth breaks after restart")
223
311
  | `brain_share_list` / `brain_unshare` | List your shares; revoke one so the link goes dead |
224
312
  | **`brain_discover`** | Search the Brain marketplace for ready-made knowledge bases |
225
313
 
226
- ### Knowledge Commons, infrastructure and roadmap
314
+ #### Knowledge Commons, infrastructure and roadmap
227
315
 
228
316
  | Tool | What it does |
229
317
  |------|-------------|
230
318
  | `syndicate` / `fedbrain_search` | Contribute to, and search, the global Knowledge Commons |
231
319
  | `brain_marketplace` / `brain_install` | Browse and install curated Domain Brains (Kubernetes, Auth, databases) |
232
320
  | `cache_get` / `cache_set` / `semantic_search` / `index_project` | Cache and semantic operations. Pass `org_id` on `cache_get` / `cache_set` to share the cache org-wide |
233
- | `cache_stats` / `cache_org_stats` | Hits, estimated USD saved and a monthly projection, per instance or across your org |
321
+ | `cache_stats` / `cache_org_stats` | Hits and requests served from the cache, per instance or across your org |
234
322
  | `list_instances` / `create_instance` / `delete_instance` | Manage Brain instances |
235
323
  | `roadmap_add` / `roadmap_next` | A project roadmap stored in the Brain |
236
324
 
237
325
  Run `health` to see what is wired up in your editor. The full catalog is generated from
238
326
  [`src/tools.ts`](./src/tools.ts).
327
+ </details>
239
328
 
240
- ## CLI commands
329
+ ### CLI commands
241
330
 
242
331
  ```bash
243
332
  npx @cachly-dev/mcp-server@latest autopilot # One command: signs in, configures every editor, fills the Brain from git
@@ -246,6 +335,9 @@ npx @cachly-dev/mcp-server@latest autopilot # One command: signs in, configures
246
335
  Every command below runs as `npx @cachly-dev/mcp-server@latest <command>`. Key and Brain
247
336
  instance come from the environment or from `~/.cachly/credentials.json`, the file `autopilot` writes.
248
337
 
338
+ <details>
339
+ <summary><b>All CLI commands</b></summary>
340
+
249
341
  | Every day | |
250
342
  |---|---|
251
343
  | `status` | Lessons, recalls and team at a glance |
@@ -289,8 +381,9 @@ The method behind `bench` is described in [BENCH.md](./BENCH.md).
289
381
  > **Tip: learn from every merged PR.** Run `learn-git` in CI with the
290
382
  > [cachly-brain-setup GitHub Action](https://github.com/cachly-dev/cachly-action) and
291
383
  > `mode: learn`. Each merged PR then teaches your Brain.
384
+ </details>
292
385
 
293
- ## CI integration
386
+ ### CI integration
294
387
 
295
388
  Every CI run is a lesson. A red→green transition is a proven fix, and a green→red one is a
296
389
  known cause. Ready-to-paste templates live in [`src/ci-integration/`](./src/ci-integration/):
@@ -308,43 +401,14 @@ known cause. Ready-to-paste templates live in [`src/ci-integration/`](./src/ci-i
308
401
  Already have months of CI history? The `brain_from_ci` tool ingests past outcomes in one
309
402
  call, the way `brain_from_git` ingests commits.
310
403
 
311
- ## FAQ
312
-
313
- **Does my AI need to call `session_start` by hand?**
314
- No. A session starts on the first tool call and ends when the editor closes.
315
-
316
- **Can my whole team share one Brain?**
317
- Yes. Use `team_learn` and `team_recall`, and invite people with
318
- `npx @cachly-dev/mcp-server@latest invite teammate@example.com`. They get an email and accept it
319
- with the link or with `join <token>`. Members can read and learn; deleting the Brain, rotating
320
- its password and billing stay with the owner.
321
-
322
- **Is my code sent to cachly servers?**
323
- Only if you call `index_project` yourself. It stores a short excerpt (up to
324
- `summary_chars`, 1200 characters by default) per indexed file, on your own EU instance.
325
- Every other tool stores lesson text, commit messages, session summaries and key-value
326
- context, but no source code. Storage is in Germany and embeddings are computed in the EU.
327
- API traffic passes through Cloudflare, a US company. The
328
- [EU guide](https://cachly.dev/docs/eu-hosted-mcp-memory-server) lists every data flow.
329
-
330
- **What is `causal_trace`?**
331
- Given an error, it walks the causal knowledge graph to find the root cause, the
332
- intermediate causes and the fix that worked, with its date and commands.
333
-
334
- **What if I hit the context-window limit mid-session?**
335
- Call `compact_recover`. It rebuilds your context from the Crystal, the recent
336
- sessions and the registry of work in progress. Usually one tool call is enough.
337
-
338
- **How do I write lessons my agent finds again?**
339
- Lead with the decisive fact. The
340
- [lessons guide](https://cachly.dev/docs/coding-agent-lessons-learned) shows how, with
341
- examples.
342
-
343
- ## Editor support matrix
404
+ ### Editor support matrix
344
405
 
345
406
  `npx @cachly-dev/mcp-server@latest autopilot` detects and configures the editors below.
346
407
  Manual snippets are in [Manual Setup](#manual-setup).
347
408
 
409
+ <details>
410
+ <summary><b>Editors, config files and sign-in paths</b></summary>
411
+
348
412
  | Editor / client | Auto-setup | Config file written | Global config | Notes |
349
413
  |---|---|---|---|---|
350
414
  | **Claude Code** | yes | `.mcp.json` | with the plugin | Without a key: test Brain at session start (plugin) or on the first tool call; browser sign-in only as fallback |
@@ -369,7 +433,9 @@ Manual snippets are in [Manual Setup](#manual-setup).
369
433
  | First tool call with `CACHLY_BRAIN_INSTANCE_ID` set but no key | Inline device flow. You already have a Brain, so no second account is created |
370
434
  | `CACHLY_JWT=cky_live_xxx npx ... autosetup` | Skips the sign-in step and uses the key you pass |
371
435
 
372
- ## Manual Setup
436
+ </details>
437
+
438
+ ### Manual Setup
373
439
 
374
440
  <details>
375
441
  <summary><b>Claude Code</b> (<code>.mcp.json</code> in the project)</summary>
@@ -426,12 +492,15 @@ Run `npx @cachly-dev/mcp-server@latest autopilot` to use your own account instea
426
492
  ```
427
493
  </details>
428
494
 
429
- ## Self-hosting and bring-your-own embeddings
495
+ ### Self-hosting and bring-your-own embeddings
430
496
 
431
497
  Embeddings turn text into vectors for the meaning-based search. By default, cachly
432
498
  computes them on its own servers in the EU as soon as you are signed in. Your text goes
433
499
  to a third-party provider only when you name that provider yourself:
434
500
 
501
+ <details>
502
+ <summary><b>Embedding providers and your own backend</b></summary>
503
+
435
504
  | Provider | Env vars | Model |
436
505
  |---|---|---|
437
506
  | cachly (default, EU servers) | none beyond your key | managed |
@@ -459,21 +528,12 @@ npx @cachly-dev/mcp-server@latest autosetup \
459
528
  `autosetup` writes `CACHLY_API_URL` into the editor config only when it differs from the
460
529
  default cloud. Default installs stay clean, and self-hosted installs keep talking to your
461
530
  backend on every editor start.
531
+ </details>
462
532
 
463
- ## Pricing
464
-
465
- Current prices and limits are on [cachly.dev/pricing](https://cachly.dev/pricing).
466
-
467
- | Tier | Storage | Price | Brains |
468
- |------|---------|-------|--------|
469
- | **Free** | 25 MB | €0/mo | 1 |
470
- | **Dev** | 200 MB | €19/mo | 3 |
471
- | **Pro** | 900 MB | €49/mo, 5 seats | 10 |
472
- | **Business** | 7 GB | €199/mo | 25 |
473
-
474
- The free tier needs no credit card.
533
+ ### Environment Variables
475
534
 
476
- ## Environment Variables
535
+ <details>
536
+ <summary><b>All environment variables</b></summary>
477
537
 
478
538
  | Variable | Default | Description |
479
539
  |----------|---------|-------------|
@@ -484,34 +544,36 @@ The free tier needs no credit card.
484
544
  | `CACHLY_ALLE_WERKZEUGE` | unset | Set to `1` to list all 124 tools instead of 27 |
485
545
  | `CACHLY_PROFILE` | unset | `lean` lists 8 tools plus `cachly_tool`, `recall` lists the 3 read-only tools |
486
546
  | `CACHLY_UPDATE_CHECK` | on | Set to `false` to stop the version check. npm is asked at most once a day, with a 2-second limit |
487
- | `CACHLY_NO_TELEMETRY` | unset | Set to `1` to disable usage pings. They include your API token and up to 80 characters of `smart_recall` queries |
547
+ | `CACHLY_NO_TELEMETRY` | unset | Set to `1` to disable usage pings. They carry up to 80 characters of `smart_recall` queries. Your API key travels only in the `Authorization` header; the API verifies it before it counts the event for your account |
488
548
  | `CACHLY_LERNEN` | on | Learning from use in the prompt hook. For 5 % of prompts the matching lessons are computed but not shown (control group), up to 10 % try a stricter or shorter setting. At the end of each turn the hook reports which setting ran and whether the agent named a shown lesson; topics are sent hashed, prompts never. Set to `0` (or `CACHLY_NO_TELEMETRY=1`) to turn it off |
489
549
  | `CACHLY_KONTROLLE_ANTEIL` | `5%` | Share of prompts in the control group. `0` turns the control group off, at most `50%` |
490
550
  | `CACHLY_ERKUNDUNG` | `10%` | Share of prompts that may try another setting. `0` keeps the leading setting, at most `10%` |
491
551
 
492
- ## Ecosystem and docs
552
+ </details>
553
+
554
+ ## Links
493
555
 
494
- | Package | What it does |
495
- |---------|-------------|
496
- | **[`@cachly-dev/mcp-server`](https://www.npmjs.com/package/@cachly-dev/mcp-server)** | This server, for Claude Code, Cursor, Copilot, Windsurf, Cline and Zed |
497
- | **[Cachly Brain for VS Code](https://marketplace.visualstudio.com/items?itemName=cachly-dev.cachly-brain)** | Status bar, lessons view and ambient learning in the editor |
498
- | **[Cachly Brain for JetBrains](https://plugins.jetbrains.com/plugin/32059-cachly-brain)** | The same Brain in IntelliJ IDEA, PyCharm, GoLand, WebStorm and Rider |
499
- | **[`@cachly-dev/openclaw`](https://www.npmjs.com/package/@cachly-dev/openclaw)** | Semantic caching for LLM calls in JS/TS apps |
500
- | **[cachly-dev/cachly-action](https://github.com/cachly-dev/cachly-action)** | GitHub Action: setup, PR risk scan, learning from merged PRs, weekly hygiene |
556
+ | Where | What you find there |
557
+ |-------|---------------------|
558
+ | [cachly.dev](https://cachly.dev) | Sign-up, dashboard and the product page |
559
+ | [cachly.dev/pricing](https://cachly.dev/pricing) | Plans, yearly billing and current limits |
560
+ | [MCP docs](https://cachly.dev/docs/mcp) · [AI memory docs](https://cachly.dev/docs/ai-memory) | Setup, tools and concepts |
561
+ | [Release notes](./CHANGELOG.md) | What changed in each version |
562
+ | [github.com/cachly-dev/cachly-mcp](https://github.com/cachly-dev/cachly-mcp) | Source code of this server |
563
+ | [GitHub Issues](https://github.com/cachly-dev/cachly-mcp/issues) | Bugs and feature requests |
564
+ | [MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=cachly) | The official entry, `io.github.cachly-dev/mcp-server` |
565
+ | [Cachly Brain for VS Code](https://marketplace.visualstudio.com/items?itemName=cachly-dev.cachly-brain) | Status bar, lessons view and ambient learning in the editor |
566
+ | [Cachly Brain for JetBrains](https://plugins.jetbrains.com/plugin/32059-cachly-brain) | The same Brain in IntelliJ IDEA, PyCharm, GoLand, WebStorm and Rider ([source](https://github.com/cachly-dev/cachly-intellij)) |
567
+ | [cachly-dev/cachly-action](https://github.com/cachly-dev/cachly-action) | GitHub Action: setup, PR risk scan, learning from merged PRs, weekly hygiene |
568
+ | [`@cachly-dev/openclaw`](https://www.npmjs.com/package/@cachly-dev/openclaw) | Semantic caching for LLM calls in JS/TS apps |
501
569
 
502
570
  The VS Code extension shows the same Brain in the editor:
503
571
 
504
572
  ![The Lessons view inside the Cachly Brain VS Code extension, listing six stored lessons](https://cachly.dev/screenshots/vscode/shot3-lesson-card.png)
505
573
 
506
- - [cachly.dev](https://cachly.dev): dashboard and sign-up
507
- - [Documentation](https://cachly.dev/docs/ai-memory)
508
- - [MCP docs](https://cachly.dev/docs/mcp)
509
- - [Release notes](./CHANGELOG.md)
510
- - [GitHub Issues](https://github.com/cachly-dev/cachly-mcp/issues): bugs and feature requests
511
-
512
574
  ---
513
575
 
514
- Solve it once. From then on, your AI knows.
576
+ **Solve it once. From then on, your AI knows.**
515
577
 
516
578
  ```bash
517
579
  npx @cachly-dev/mcp-server@latest autopilot